<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./lib/bootstrap.css">
</head>
<body>
    <!--区域-->
    <div id="app">
        <table class='table table-bordered table-hover table-striped'>
            <thead>
                <th>索引</th>
                <th>id</th>
                <th>姓名</th>
            </thead>
            <tbody>
                <tr v-for='(item, index) in list' :key='item.id' :title='item.name + index'>
                    <td>{{ index }}</td>
                    <td>{{ item.id }}</td>
                    <td>{{ item.name }}</td>
                </tr>
            </tbody>
        </table>
    </div>

    <!--引入-->
    <script src="./lib/vue-2.6.12.js"></script>

    <!--创建实例对象-->
    <script>
        const vm = new Vue({
            el: '#app',
            data: {
                list: [
                    {id:1, name: 'zhangsan'},
                    {id:2, name: 'zhann'},
                    {id:3, name: 'zhsan'},
                    {id:4, name: 'zhasan'},
                ]
            }
        })
    </script>
</body>
</html>